<!doctype html>  


<!--[if lt IE 7 ]> <html lang="en" class="no-js ie6"> <![endif]-->
<!--[if IE 7 ]>    <html lang="en" class="no-js ie7"> <![endif]-->
<!--[if IE 8 ]>    <html lang="en" class="no-js ie8"> <![endif]-->
<!--[if IE 9 ]>    <html lang="en" class="no-js ie9"> <![endif]-->
<!--[if (gt IE 9)|!(IE)]><!--> <html lang="en" class="no-js"> <!--<![endif]-->
<head>
  <meta charset="utf-8">

  <!-- Always force latest IE rendering engine (even in intranet) & Chrome Frame 
       Remove this if you use the .htaccess -->
  <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">

  <title>嘴闲着 特危险</title>
  <!--  Mobile viewport optimized: j.mp/bplateviewport -->
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <base href="{$smarty.const.SITE_URL}" />

  <link rel="shortcut icon" href="images/favicon.ico">
  <link rel="apple-touch-icon" href="images/apple-touch-icon.png">

  <!-- CSS : implied media="all" -->
  <link rel="stylesheet" href="styles/style.css?v=2">
	<link rel="stylesheet" href="js/jquery-ui.css" type="text/css" media="all" />

  <!-- Uncomment if you are specifically targeting less enabled mobile browsers
  <link rel="stylesheet" media="handheld" href="css/handheld.css?v=2">  -->
  <!-- All JavaScript at the bottom, except for Modernizr which enables HTML5 elements & feature detects -->

  <!-- Javascript at the bottom for fast page loading -->

  <!-- Grab Google CDN's jQuery. fall back to local if necessary -->
  <script src="js/libs/jquery-1.4.2.min.js" type="text/javascript"></script>
  <script src="js/jquery-ui.min.js" type="text/javascript"></script>
	
  <script src="js/modernizr-1.7.min.js"></script>
</head>
<style>
#top_slider-frame > div.top_slider { padding: 10px !important; };
</style>

<body>
  <div class="container">
  	<a href="/" class="tac logo"><img src="images/logo.gif" alt="" /></a>
  	<div class="bdr_tb nav_head clearfix">
  		<span class="fl">
  		{if !$smarty.session.user}
				<a href="login.html" {if $controller=='login'} class="current" {/if}>登录</a>
				<a href="register.html" {if $controller=='register'} class="current" {/if}>注册</a>
			{else}
				欢迎回来: {$smarty.session.user.name} &nbsp; <a href="logout.html">退出</a>
			{/if} 
			| <a href="index?type=1&page=1&slider={$smarty.get.slider}" >{if $smarty.get.page==1 }<font color="red">最新</font>{else}最新{/if}</a>
			<a href="index?type=2&page=2&slider={$smarty.get.slider}" >{if $smarty.get.page==2}<font color="red">最冷</font>{else}最冷{/if}</a>
			<a href="index?type=3&page=3&slider={$smarty.get.slider}" >{if $smarty.get.page==3}<font color="red">最热</font>{else}最热{/if}</a>

  		</span>
  		<div class="top_slider fl" {if $controller!='index' && $controller!='use_post'} style="display:none;" {/if}>
  			<div id="slider"></div>
  		</div><!-- End top_slider -->
			{if $smarty.session.user}
  		<span class="fr">
			<a href="use_post?self=1&type=1&slider={$smarty.get.slider}" >{if $controller=='use_post' && $smarty.get.self==1}<font color="red">我的回复</font>{else}我的回复{/if}</a>
			</span>
			<span class="fr">
<a href="use_post?self=2&type=2&slider={$smarty.get.slider}" >{if $controller=='use_post' && $smarty.get.self==2}<font color="red">我的收藏</font>{else}我的收藏{/if}</a>
			</span>
			<span class="fr">

<a href="use_post?self=3&type=0&slider={$smarty.get.slider}" >{if $controller=='use_post' && $smarty.get.self==3}<font color="red">我的首页</font>{else}我的首页{/if}</a>
<a href="use_post?self=4&type=0&slider={$smarty.get.slider}" >{if $controller=='use_post' && $smarty.get.self==4}<font color="red">我的帖子</font>{else}我的帖子{/if}</a>

			</span>
			{/if}
	</div>
	<script>
	var current_request = null;
	var slider_arr={};
	slider_arr[0] = '全部';
	var co = '{$controller}';
	{foreach $slider as $key=>$val}
		slider_arr[{$key}]='{slider_value($key)}';
	{/foreach}
	var SITE_URL = '{$smarty.const.SITE_URL}';
	$(function() {

		$( "#slider" ).slider({
			value:'{$smarty.get.slider}',
			min: 0,
			max: '{count($slider)}',
			step: 1,
			stop: function( event, ui ) {
				if (co=='use_post') {
					location.href = 'use_post?slider='+ui.value+'&self={$smarty.get.self}&type={$smarty.get.type}';
				}else{
				location.href = '?slider='+ui.value+'&page={$smarty.get.page}';
				};
				// $( "#amount" ).val( slider_arr[ui.value] );
			},
			slide:function(event , ui){
				$(".ui-state-default").html('<div class="slider_pops">'+slider_arr[ui.value]+'</div>');
			}
		});

	});
	
	$(function(){
		$(".ui-state-default").html('<div class="slider_pops">{if slider_value($smarty.get.slider)}{slider_value($smarty.get.slider)}{else}全部{/if}</div>');
	});
	
	
	
	</script>
